#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
int main(){
	double pai = 3.14;
	int r, h;
	scanf("%d%d", &r, &h);
	double area = 4 * r * r + pai * r * r + 2*sqrt(2)*r * h +2 * r * h + pai * r * h;
	printf("%.2lf", area);
	return 0;
}